<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	request.setAttribute("basePath",basePath);
%>
<%@ include file="/resources/js/easyui/taglibs.jsp"%>
<%@ include file="/resources/js/wechat/_wechatui.jsp"%>
<%@ include file="/resources/js/easyui/_viewJS.jsp"%>
<!DOCTYPE>
<html>
	<head>
		<title>套餐</title>
	</head>
	<body>
		<div class="loading"></div>
		<!-- header -->
		<header>
			<a href="javascript:history.go(-1);" class="top_fh">套餐</a>
			<a href="JavaScript:;" class="top_add"></a>
		</header>
		<!-- header end -->
		
		<div class="page taocan_page">
			<div class="tcbanner"><img src="${basePath}resources/images/wechat/taocan_banner.png" alt=""></div>
			<div class="wltc_inner">
				<em>网络套餐</em>
				<ul>
                    <c:forEach items="${list}" var="discount" varStatus="status">
                        <li><a href="${basePath}wechat/discount/${discount.discountid}/editView/${status.index+1}">套餐${status.index+1}<span>${discount.discountname}</span></a></li>
                    </c:forEach>
				</ul>
			</div>
			<div class="wltc_addgl"><a href="JavaScript:;">添加/管理</a></div>
		</div>

		<!-- footer -->
		<%@include file="/WEB-INF/jsp/wechat/_footer.jsp"%>
		<!-- footer end -->

		<!-- top加号弹窗 -->
		<%@include file="/WEB-INF/jsp/wechat/_top.jsp"%>
		<!-- top加号弹窗 end -->

		<!-- 添加管理弹窗 -->
		<div class="tanc_tjglpop ty_pop">
			<div class="popbg"></div>
			<div class="tanc_tjglinner">
				<a href="javascript:void(0)" id="manageWinBtn">管理套餐</a>
				<a href="javascript:void(0)" id="addWinBtn">添加套餐</a>
			</div>
		</div>
		<!-- 添加管理弹窗 end -->
	</body>

	<script type="application/javascript">
		function View(){
			var that = this;

			that.events = [
				{ sel : '#manageWinBtn', act : 'click', func : 'manageWin' },
				{ sel : '#addWinBtn', act : 'click', func : 'addWin' }
			];

			that.manageWin = function(){
				window.location.href = '${basePath}wechat/discount/listView';
			};

			that.addWin = function(){
				window.location.href = '${basePath}wechat/discount/addView';
			};

			EventHandler.call(that, that.events);

			return that;
		}

		var view;

		$(function(){
			inherit(View, EventHandler);
			view = new View();
		});
	</script>

</html>
